<!DOCTYPE html>
<html>

<head>
    <title>今日订单</title>
    <#include "../common/htmlHeard.ftl">


</head>

<body>
<div class="x-nav">
    <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right"
       href="javascript:location.replace(location.href);" title="刷新">
        <i class="layui-icon" style="line-height:30px">ဂ</i></a>
</div>
<div class="x-body">
    <div class="layui-row">
        <button class="layui-btn" lay-submit="" lay-filter="sreach" >午餐</button>
    </div>
    <xblock>
        <span class="x-right" style="line-height:40px">共有数据：${lunchPageInfo.totalElements} 条</span>
    </xblock>
    <table class="layui-table">
        <thead>
        <tr>
            <th>菜名</th>
            <th>订单量</th>
        </tr>
        </thead>
        <tbody>
        <#list lunchPageInfo.content as o>
        <tr>
            <td>${o.foodName}</td>
            <td>${o.foodQuantity}</td>
        </tr>
        </#list>
        </tbody>
    </table>
    <div class="page">
        <div>
            <#if lunchCurrentPage lte 1>
                <a href="#" class="prev">&lt;&lt;</a>
            <#else>
                <a lass="prev" href="${pageUrl}?lunchPage=${lunchCurrentPage - 1}&lunchSize=${lunchSize}">&lt;&lt;</a>
            </#if>
            <#list 1..lunchPageInfo.getTotalPages() as index>
                <#if lunchCurrentPage == index>
                   <a class="current" href="#">${index}</a>
                <#else>
                    <a class="current" href="${pageUrl}?lunchPage=${index}&lunchSize=${lunchSize}">${index}</a>
                </#if>
            </#list>

            <#if lunchCurrentPage gte lunchPageInfo.getTotalPages()>
                <a class="next"  href="#">&gt;&gt;</a>
            <#else>
                <a class="next"  href="${pageUrl}?lunchPage=${lunchCurrentPage + 1}&lunchSize=${lunchSize}">&gt;&gt;</a>
            </#if>
        </div>
    </div>

    <div class="layui-row">
        <button class="layui-btn" lay-submit="" lay-filter="sreach">晚餐</button>
    </div>
    <xblock>
        <span class="x-right" style="line-height:40px">共有数据：${dinnerPageInfo.totalElements} 条</span>
    </xblock>
    <table class="layui-table">
        <thead>
        <tr>
            <th>菜名</th>
            <th>订单量</th>
        </tr>
        </thead>
        <tbody>
        <#list dinnerPageInfo.content as d>
        <tr>
            <td>${d.foodName}</td>
            <td>${d.foodQuantity}</td>
        </tr>
        </#list>
        </tbody>
    </table>
    <div class="page">
        <div>
            <#if dinnerCurrentPage lte 1>
                <a href="#" class="prev">&lt;&lt;</a>
            <#else>
                <a lass="prev" href="${pageUrl}?dinnerPage=${dinnerCurrentPage - 1}&dinnerSize=${dinnerSize}">&lt;&lt;</a>
            </#if>
            <#list 1..dinnerPageInfo.getTotalPages() as index>
                <#if dinnerCurrentPage == index>
                   <a class="current" href="#">${index}</a>
                <#else>
                    <a class="current" href="${pageUrl}?dinnerPage=${index}&dinnerSize=${dinnerSize}">${index}</a>
                </#if>
            </#list>

            <#if dinnerCurrentPage gte dinnerPageInfo.getTotalPages()>
                <a class="next"  href="#">&gt;&gt;</a>
            <#else>
                <a class="next"  href="${pageUrl}?dinnerPage=${dinnerCurrentPage + 1}&dinnerSize=${dinnerSize}">&gt;&gt;</a>
            </#if>
        </div>
    </div>

</div>
<script>
    layui.use('laydate', function () {
        var laydate = layui.laydate;

        //执行一个laydate实例
        laydate.render({
            elem: '#start' //指定元素
        });

        //执行一个laydate实例
        laydate.render({
            elem: '#end' //指定元素
        });
    });
</script>

</body>

</html>